#!/usr/bin/python

import sys
import re
from Bio import SeqIO
from Bio.SeqUtils import GC

def fmt(f):
    st = '{0:.4}'.format(f)
    return st    

seq_file = sys.argv[1]
tf = open(seq_file, "rU")
#seq = SeqIO.read(tf, "fasta")
seqs = SeqIO.parse(tf, "fasta")

for seq in seqs: 
    print seq.id + "\t" + fmt(GC(seq.seq))
